package com.jia.videos.controller;

import com.jia.videos.common.lang.R;
import com.jia.videos.entity.VideoShow;
import com.jia.videos.service.VideoShowService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/videos/comic")
@CrossOrigin
@Api(tags = "动漫管理")
public class ComicController {

    @Autowired
    VideoShowService videoShowService;

    @GetMapping("banner")
    public R banner() {
        List<VideoShow> list = videoShowService.getComicBanner();
        return R.ok().data("data",list);
    }

    @GetMapping("hotList")
    public R hotList() {
        List<VideoShow> list = videoShowService.getComicHotList();
        return R.ok().data("data",list);
    }
}
